package com.lmf.annotation;

import com.lmf.annotation.config.MyConfig_Autowried_2;
import com.lmf.annotation.dao.MyDao;
import org.junit.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class IOCTest_BeanAutowried_2 {
    //测试@Autowried注解加在构造方法，参数，方法上面的作用
    @Test
    public void test_0(){
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(MyConfig_Autowried_2.class);
        MyDao bean = context.getBean(MyDao.class);
        System.out.println(bean);
    }
}
